package com.lly.bigdata.bgayx.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lly.bigdata.bgayx.entity.SysMenu;
import com.lly.bigdata.bgayx.entity.SysUser;
import com.lly.bigdata.bgayx.vo.Result;
import com.lly.bigdata.bgayx.vo.SearchModel;
import com.lly.bigdata.bgayx.vo.ZTreeBean;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * 菜单管理 服务类
 * </p>
 *
 * @author lly
 * @since 2020-10-21
 */
public interface ISysMenuService extends IService<SysMenu> {

    /**
     * 用户模块权限
     *
     * @param user
     * @return
     */
    Set<String> getUserMenuPermSet(SysUser user);

    /**
     * 查询分页
     *
     * @param searchModel
     * @return
     */
    Result queryPage(SearchModel searchModel);

    Result queryAll(SearchModel searchModel);

    /**
     * @Author lly
     * @Description 查询pid总数
     * @Date 2022/1/10 18:19
     * @Param [pid]
     * @return java.util.List<com.lly.bigdata.SysMenu>
     **/
    int selectCountPid(String pid);

    /**
     * 获取查询树
     *
     * @param searchModel
     * @return
     */
    Result queryGdTree(SearchModel searchModel);

    Result querySearch(SearchModel searchModel);

    List<ZTreeBean> getTreeBeans(HttpServletRequest request, String id, String type);

    /**
     * 用户home 树
     *
     * @param id
     * @param request
     * @param type
     * @return
     */
    List<ZTreeBean> userHomeTreeBeans(SysUser loginUser, String id, HttpServletRequest request, String type);

    /**
     * 添加菜单
     *
     * @param jkfwMenu
     * @return
     */
    Result addMenu(SysMenu jkfwMenu);

    /**
     * 修改菜单
     *
     * @param jkfwMenu
     */
    void updateMenu(SysMenu jkfwMenu);

    /**
     * 删除菜单
     *
     * @param id
     * @return
     */
    Result delMenu(String id);
}
